<?php

require_once("Transaction.php");
require_once("BankAccount.php");

$boa = new BankAccount(1, "Bank of America", 200, "06/22/2011");
$chase = new BankAccount(2, "Chase", 1800, "06/22/2011");

$transactions[] = new Transaction(1, "01/05/2011", 100, $chase);
$transactions[] = new Transaction(2, "04/06/2011", 15, $chase);
$transactions[] = new Transaction(3, "12/23/2011", 27.95, $boa);

?>
<!DOCTYPE html>
<html>
	<head>
		<title>Transactions</title>
	</head>
	<body>
		<table>
<?php
foreach ($transactions as $transaction)
{
?>
			<tr>
				<td><?php echo $transaction->date;?></td>
				<td>$<?php echo $transaction->amount;?></td>
				<td><?php echo $transaction->bank_account->name;?></td>
			</tr>
<?php
}
?>
		</table>
	</body>
</html>